﻿<Window x:Class="WpfWordsLearner.Views.AddWordsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:mv="clr-namespace:WpfWordsLearner.ViewModels"
        Title="Add Words View" Height="200" Width="300">
	<Window.Resources>
		<mv:AddWordsViewModel x:Key="VM"/>
	</Window.Resources>
	<Grid DataContext="{StaticResource VM}">
		<Grid.RowDefinitions>
			<RowDefinition/>
			<RowDefinition/>
			<RowDefinition/>
		</Grid.RowDefinitions>
		<StackPanel DataContext="{Binding Model}">
			<TextBlock Text="English word:"/>
			<TextBox x:Name="txtEnglish" Text="{Binding Path=EnglishWord, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
		</StackPanel>
		<StackPanel Grid.Row="1" DataContext="{Binding Model}">
			<TextBlock Text="Translate:"/>
			<TextBox x:Name="txtTranslate" Text="{Binding Path=Translate, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
		</StackPanel>
		<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
			<Button x:Name="btnAdd" Content="Add" Height="25" Width="50"
					Command="{Binding Source={StaticResource VM}, Path=ClickCommand}"/>
			<Button x:Name="btnCancel" Content="Cancel" Height="25" Width="50" IsCancel="True"
					Command="{Binding Source={StaticResource VM}, Path=ClickCommand2}"/>
		</StackPanel>
	</Grid>
</Window>
